﻿/********************************************************************************
** @ Date:2025/07/24
** @ Author: Gaojia
** @ Description:  修改卡片绑定设备弹出界面
** @ Version:1.0.0
** @ Fun:
********************************************************************************/
#ifndef UChangeDevice_H
#define UChangeDevice_H



#include <QDialog>
#include "ui_UChangeDevice.h"
#include <QStandardItemModel>
#include "CBaseDevice.h"
class UChangeDevice : public QDialog
{
	Q_OBJECT

public:
	UChangeDevice(QString sDllName,QString sDeviceId, bool bAdd=false,int nDeviceType=0, QWidget *parent = nullptr);
	~UChangeDevice();
private:
	void initUi();   //初始化界面
	void buildItemTree(CBaseNode *pNode, QStandardItem *pParentItem);//创建树
private:
	Ui::UChangeDeviceClass ui;
	QStandardItemModel *m_pModel;
	bool m_bAdd;
	QString m_sDllName;
	int m_nDeviceType;
	QString m_sDeviceId;
	CBaseDevice *m_pCurrDevice;  //当前设备
private slots:
	void onTreeClickeTemple(const QModelIndex &index);         // 设备树点击类
	void slot_clickedSave();  //单击保存
	void slot_clickedCancel();  //单击取消
signals:
	void sign_selectDevice(QString sGuid);
	void sign_addDevice(QString sGuid);
};
#endif